Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it possible to use stage0 libtest on compiletest #139386

Merged
merged 5 commits into from
Apr 8, 2025

Conversation

onur-ozkan
Copy link
Member

With #119899, building the library tree will require a stage 1 compiler. This is because compiletest is defined as a ToolStd (since #68019) in order to use the in-tree library. As a result, #119899 makes certain development workflows more difficult as changes on the compiler tree will now require recompiling compiletest each time.

This PR allows switching ToolStd to ToolBootstrap with a simple boolean option in bootstrap.toml to allow compiletest to use the stage 0 libtest instead.

The changes under src/ci are clearly intended to make sure that compiletest doesn't break during future bootstrap beta bumps.

@rustbot
Copy link
Collaborator

rustbot commented Apr 4, 2025

r? @Kobzol

rustbot has assigned @Kobzol.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Apr 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 4, 2025

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@onur-ozkan onur-ozkan force-pushed the configurable-compiletest-libtest branch from 15d164d to 7f3da8c Compare April 4, 2025 17:59
@onur-ozkan onur-ozkan force-pushed the configurable-compiletest-libtest branch from 7f3da8c to 8c17501 Compare April 5, 2025 06:05
@rustbot
Copy link
Collaborator

rustbot commented Apr 5, 2025

This PR modifies src/bootstrap/defaults.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@onur-ozkan onur-ozkan force-pushed the configurable-compiletest-libtest branch 3 times, most recently from 2ceaed5 to 48e9c4a Compare April 5, 2025 11:19
@onur-ozkan onur-ozkan force-pushed the configurable-compiletest-libtest branch 4 times, most recently from c757f55 to c3cfdfc Compare April 5, 2025 11:25
@jieyouxu jieyouxu self-assigned this Apr 5, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, cc @Kobzol in case you still have concerns.

@onur-ozkan onur-ozkan force-pushed the configurable-compiletest-libtest branch from c3cfdfc to c830665 Compare April 7, 2025 07:09
Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment. The change otherwise looks fine. I'm not sure if we shouldn't do an MCP for this, but I think that libtest changed very rarely recently, so this shouldn't require a lot of cfg(bootstrap) places in compiletest. If it becomes a problem in the future, we can discuss it further.

@onur-ozkan
Copy link
Member Author

Left one comment. The change otherwise looks fine. I'm not sure if we shouldn't do an MCP for this, but I think that libtest changed very rarely recently, so this shouldn't require a lot of cfg(bootstrap) places in compiletest.

In my opinion, the point we are discussing (whether compiletest should support stage0 with cfg(bootstrap) or require a stage1 compiler) seems more suitable for a Zulip thread (which is already ongoing). I'm not sure if this will change in the near future with other possible workarounds, so I wouldn't go for an MCP at this point.

Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'm fine with this now, so no other concerns.

It seems like you committed a LLVM submodule update by accident.

@onur-ozkan onur-ozkan force-pushed the configurable-compiletest-libtest branch from d2840fa to cae28b5 Compare April 7, 2025 13:24
@Kobzol
Copy link
Contributor

Kobzol commented Apr 7, 2025

I suppose that you can r=jieyouxu,kobzol unless you want to change something else.

@onur-ozkan
Copy link
Member Author

@bors r=jieyouxu,kobzol

@bors
Copy link
Collaborator

bors commented Apr 7, 2025

📌 Commit cae28b5 has been approved by jieyouxu,kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 7, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Apr 8, 2025
…t-libtest, r=jieyouxu,kobzol

make it possible to use stage0 libtest on compiletest

With rust-lang#119899, building the library tree will require a stage 1 compiler. This is because `compiletest` is defined as a `ToolStd` (since rust-lang#68019) in order to use the in-tree library. As a result, rust-lang#119899 makes certain development workflows more difficult as changes on the compiler tree will now require recompiling `compiletest` each time.

This PR allows switching `ToolStd` to `ToolBootstrap` with a simple boolean option in `bootstrap.toml` to allow `compiletest` to use the stage 0 `libtest` instead.

The changes under `src/ci` are clearly intended to make sure that `compiletest` doesn't break during future bootstrap beta bumps.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 8, 2025
…errors

Rollup of 19 pull requests

Successful merges:

 - rust-lang#138676 (Implement overflow for infinite implied lifetime bounds)
 - rust-lang#139024 (Make error message for missing fields with `..` and without `..` more consistent)
 - rust-lang#139098 (Tell LLVM about impossible niche tags)
 - rust-lang#139124 (compiler: report error when trait object type param reference self)
 - rust-lang#139321 (Update to new rinja version (askama))
 - rust-lang#139346 (Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check`)
 - rust-lang#139386 (make it possible to use stage0 libtest on compiletest)
 - rust-lang#139421 (Fix trait upcasting to dyn type with no principal when there are projections)
 - rust-lang#139468 (Don't call `Span::with_parent` on the good path in `has_stashed_diagnostic`)
 - rust-lang#139476 (rm `RegionInferenceContext::var_infos`)
 - rust-lang#139481 (Add job summary links to post-merge report)
 - rust-lang#139485 (compiletest: Stricter parsing for diagnostic kinds)
 - rust-lang#139490 (Update some comment/docs related to "extern intrinsic" removal)
 - rust-lang#139491 (Update books)
 - rust-lang#139496 (Revert r-a changes of rust-lang#139455)
 - rust-lang#139500 (document panic behavior of Vec::resize and Vec::resize_with)
 - rust-lang#139501 (Fix stack overflow in exhaustiveness due to recursive HIR opaque hidden types)
 - rust-lang#139504 (add missing word in doc comment)
 - rust-lang#139507 (compiletest: Trim whitespace from environment variable names)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 8, 2025
Rollup of 10 pull requests

Successful merges:

 - rust-lang#138676 (Implement overflow for infinite implied lifetime bounds)
 - rust-lang#139024 (Make error message for missing fields with `..` and without `..` more consistent)
 - rust-lang#139098 (Tell LLVM about impossible niche tags)
 - rust-lang#139124 (compiler: report error when trait object type param reference self)
 - rust-lang#139321 (Update to new rinja version (askama))
 - rust-lang#139346 (Don't construct preds w escaping bound vars in `diagnostic_hir_wf_check`)
 - rust-lang#139386 (make it possible to use stage0 libtest on compiletest)
 - rust-lang#139421 (Fix trait upcasting to dyn type with no principal when there are projections)
 - rust-lang#139464 (Allow for reparsing failure when reparsing a pasted metavar.)
 - rust-lang#139490 (Update some comment/docs related to "extern intrinsic" removal)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ab80f57 into rust-lang:master Apr 8, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 8, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 8, 2025
Rollup merge of rust-lang#139386 - onur-ozkan:configurable-compiletest-libtest, r=jieyouxu,kobzol

make it possible to use stage0 libtest on compiletest

With rust-lang#119899, building the library tree will require a stage 1 compiler. This is because `compiletest` is defined as a `ToolStd` (since rust-lang#68019) in order to use the in-tree library. As a result, rust-lang#119899 makes certain development workflows more difficult as changes on the compiler tree will now require recompiling `compiletest` each time.

This PR allows switching `ToolStd` to `ToolBootstrap` with a simple boolean option in `bootstrap.toml` to allow `compiletest` to use the stage 0 `libtest` instead.

The changes under `src/ci` are clearly intended to make sure that `compiletest` doesn't break during future bootstrap beta bumps.
@onur-ozkan onur-ozkan deleted the configurable-compiletest-libtest branch April 8, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants